#include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	double money=0;
	cin>>n;
	if(n<=150)
		money+=n*0.4463;
	else if(150<n&&n<401)
	{
		money+=150*0.4463;
		money+=(n-150)*0.4663;
	}	
	else if(n>400)
	{
		money+=150*0.4463;
		money+=250*0.4663;
		money+=(n-400)*0.5663;
	}	
	cout<<(int)(money*10+0.5)/10.0;
    return 0;
}
